# !/usr/bin/python
# -*-encoding=utf-8
from tkinter import *
from tkinter import messagebox

root = Tk()

root.title("我的第一个GUI")
root.geometry("500x300+100+200") # 宽x高+左+上


btn01 = Button(root)
btn01["text"] = "点我就送花"

btn01.pack()

def sendFlower(e):
    messagebox.showinfo("Message", "送你一朵玫瑰花，亲亲我吧")
    print("send you 999")

btn01.bind("<Button-1>", sendFlower)

root.mainloop()  # 调用组件的mainloop()方法，进入事件循环